//
//  MZY_ButtonCell.m
//  FullHouse
//
//  Created by dllo on 16/1/25.
//  Copyright © 2016年 yy. All rights reserved.
//

#import "MZY_ButtonCell.h"

#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height

@implementation MZY_ButtonCell

- (void)dealloc
{
    [self.picImageView release];
    [super dealloc];
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView{
    
    self.titleLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.titleLabel];
    [self.titleLabel release];
    
    self.picImageView = [[UIImageView alloc]init];
    [self.contentView addSubview:self.picImageView];
    [self.picImageView release];
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.titleLabel.frame = CGRectMake(10, 15, 100, 20);
    self.picImageView.frame = CGRectMake(WIDTH - HEIGHT, 1, HEIGHT, HEIGHT - 2);
}

@end
